package fina2.dcs.common.resources;

import java.util.Locale;
import java.util.ResourceBundle;

public class MessageBundleReader {
	public static ResourceBundle loadMessageBundle() {
		Locale l = new Locale(Locale.ENGLISH.getLanguage());
		ClassLoader cl = Thread.currentThread().getContextClassLoader();
		ResourceBundle bundle = ResourceBundle.getBundle("messages", l, cl);
		return bundle;
	}

	public static ResourceBundle loadMessageBundle(String langCode) {
		Locale l = new Locale(langCode);
		ClassLoader cl = Thread.currentThread().getContextClassLoader();
		ResourceBundle bundle = ResourceBundle.getBundle("messages", l, cl);
		return bundle;
	}
}